<?php
class WorkViewPanel extends CWidget {
	
	public $data = null;
	public $id;
	
	public function getData()
	{
		if ($this->data == null){
			
			$this->data=Media::model()->findByPk((int)$this->id);
			
		}
		
		return $this->data;

	}
	
	public function run()
	{
		
		$this->render('theme/light/workview',array(
				'model'=>$this->getData()	
		));
	}
	
}

?>